﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace msBsc.WebUi.wMall.Public
{
	public partial class wfTravelSearch : msBsc.Cls.BPage
	{
		protected void Page_Load(object sender, EventArgs e)
		{

		}

        private void getTravel() 
        {
            string pageRows = this.GetParamHtValue("pageRows");
            string pageNum = this.GetParamHtValue("pageNum");
            string key = this.GetParamHtValue("key");
            using (msBsc.AppLogic.DataAlc.CBizPushScenic scenic = new AppLogic.DataAlc.CBizPushScenic())
            {
                int pRows = 16;
                int.TryParse(pageRows, out pRows);
                int pNum = 1;
                int.TryParse(pageNum, out pNum);
                DataSet ds = scenic.GetRecommInfoByKeyVal(key,pNum,pRows);
                if (ds == null || ds.Tables[0].Rows.Count < 1)
                {
                    return;
                }
                string strJson = msBsc.AppLogic.Cfg.HttpTools.GetJsonByTable(ds.Tables[0], "", "", 1, 20, "");
                this.ExecJScript(@"laySvcList(" + strJson + "," + ds.Tables[0].Rows[0]["RECOMM_COUNT"] + ")");
            }
        }

        public override void DoAction()
        {
            if (this.strAction == "init")
            {
                getTravel();
            }
        }
	}
}